import request from "@/utils/request";


//获取所有课程列表
export const getAllCourseList = (data) => {
    return request({
        method: 'post',
        url: `api/x-coures/select_coures_pages`,
        data: data
        //简单写法
        // data
    })
}


//设置课程的上下架状态
export const setCourse = (data) => {
    return request({
        method: 'put',
        url: `api/x-coures/update_coure_status`,
        data: data
    })
}

//上传图片
export const uploadImage = (data,onUploadProgress) => {
    return request({
        method: 'post',
        url: `api/x-coures/upload_coure_img`,
        data: data,
        onUploadProgress:onUploadProgress
    })
}
